EMT Practice Test

1. Question Content...


Question List

Question1: Which option cannot be used to keep secrets out of Terraform configuration files?

Question2: A developer accidentally launched a VM (virtual machine) outside of the Terraform workflow and ended up with two servers with the same name. They don't know which VM Terraform manages but do have a list of all active VM IDs.
Which of the following methods could you use to discover which instance Terraform manages?

Question3: You cannot install third party plugins using terraform init.

Question4: _______backends support state locking.

Question5: You ate making changes to existing Terraform code to add some new infrastructure. When is the best time to run terraform validate?

Question6: Which of the following is not a valid Terraform variable type?

Question7: How do you specify a module's version when publishing it to the public terraform Module Registry?

Question8: Where can Terraform not load a provider from?

Question9: If a DevOps team adopts AWS CloudFormation as their standardized method for provisioning public cloud resoruces, which of the following scenarios poses a challenge for this team?

Question10: Terraform configuration (including any module references) can contain only one Terraform provider type.

Question11: As a member of an operations team that uses infrastructure as code (lac) practices, you are tasked with making a change to an infrastructure stack running in a public cloud. Which pattern would follow laC best practices for making a change?

Question12: What feature stops multiple users from operating on the Terraform state at the same time?

Question13: In Terraform HCL, an object type of object({name=string, age-number}) would match this value.

Question14: You must use different Terraform commands depending on the cloud provider you use.

Question15: Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?

Question16: What does state looking accomplish?

Question17: What does this code do?

Question18: Which of these commands makes your code more human readable?

Question19: You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage these VMs using Terraform instead. What are the two things you must do to achieve this? Choose two correct answers.

Question20: Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?

Question21: A developer on your team is going lo leaf down an existing deployment managed by Terraform and deploy a new one. However, there is a server resource named aws instant.ubuntu[l] they would like to keep. What command should they use to tell Terraform to stop managing that specific resource?

Question22: Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest. How can Terraform Cloud automatically and proactively enforce this security control?

Question23: Outside of the required_providers block, Terraform configurations always refer to providers by their local names.

Question24: You modified your Terraform configuration and run Terraform plan to review the changes. Simultaneously, your teammate manually modified the infrastructure component you are working on. Since you already ran terraform plan locally, the execution plan for terraform apply will be the same.

Question25: Which backend does the Terraform CU use by default?

Question26: What are some benefits of using Sentinel with Terraform Cloud/Terra form Cloud? Choose three correct answers.

Question27: Which of the following should you put into the required_providers block?

Question28: Which of the following ate advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.

Question29: As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?

Question30: Which is the best way to specify a tag of v1.0.0 when referencing a module stored in Git (for example.
Git::https://example.com/vpc.git)?

Question31: When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)

Question32: You much initialize your working directory before running terraform validate.

Question33: How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? Choose two correct answers.

Question34: When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?

Question35: When you use a remote backend that needs authentication, HashiCorp recommends that you:

Question36: What does the default "local" Terraform backend store?

Question37: Terraform variable names are saved in the state file.

Question38: Select the command that doesn't cause Terraform to refresh its state.

Question39: How does the Terraform cloud integration differ from other state backends such as S3, Consul,etc?

Question40: Terraform providers are part of the Terraform core binary.

Question41: You can reference a resource created with for_each using a Splat ( *) expression.

Question42: What is the Terraform style convention for indenting a nesting level compared to the one above it?

Question43: The public Terraform Module Registry is free to use.

Question44: You are working on some new application features and you want to spin up a copy of your production deployment to perform some quick tests. In order to avoid having to configure a new state backend, what open source Terraform feature would allow you create multiple states but still be associated with your current code?

Question45: One remote backend configuration always maps to a single remote workspace.

Question46: Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?

Question47: What is the name of the default file where Terraform stores the state?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.

Question48: You add a new provider to your configuration and immediately run terraform apply in the CD using the local backend. Why does the apply fail?

Question49: You have multiple team members collaborating on infrastructure as code (IaC) using Terraform, and want to apply formatting standards for readability.
How can you format Terraform HCL (HashiCorp Configuration Language) code according to standard Terraform style convention?

Question50: Which of the following does terraform apply change after you approve the execution plan? (Choose two.)

Question51: You add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The existing and new resources use the same provider. The working contains a .terraform.lock, hc1 file.
How will Terraform choose which version of the provider to use?

Question52: When do changes invoked by terraform apply take effect?

Question53: Which of these statements about Terraform Cloud workspaces is false?

Question54: How does Terraform manage most dependencies between resources?

Question55: Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.

Question56: Which task does terraform init not perform?

Question57: Which of the following is not a key principle of infrastructure as code?

Question58: Module variable assignments are inherited from the parent module and you do not need to explicitly set them.

Question59: You have created a main.tf Terraform configuration consisting of an application server, a database and a load balanced. You ran terraform apply and Terraform created all of the resources successfully.
Now you realize that you do not actually need the load balancer, so you run terraform destroy without any flags. What will happen?